#include "lib.h"



long unsigned int fibonacci_n(int n)
{
	int f0 = 0;
	int f1 = 1;
	int i;
	long unsigned int  fn = 0;
	
	if (n==0) {
		return f0;
	}else if (n == 1) {
		return f1;
	}
	
	for (i=2; i<=n; i++) {
		fn = f1 + f0; 
		f0 = f1;
		f1= fn;
		printf("f[%d]:%lu\n",i,fn);
	}  
	return fn;
}

int main(int argc, char ** argv)
{
	int n = 10;
	if (argc == 2) {
		n = atoi(argv[1]);
	}
	fibonacci_n(n);
	return 0;
}

